-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Create initial Coordinator V2 service #444
Conversation
0d49621
to
135c00d
Compare
523545d
to
47d2b24
Compare
3241d19
to
c971512
Compare
cb2021b
to
9c7f2b8
Compare
a4969ba
to
af1ff04
Compare
af1ff04
to
ebec14c
Compare
3dbc9ee
to
b76eb37
Compare
6fd4af8
to
bf00ccb
Compare
7135848
to
165111f
Compare
@@ -26,7 +26,7 @@ wildmatch = "2.1.1" | |||
|
|||
registry-types = { path = "../registry/types", features = ["near-primitives"] } | |||
|
|||
near-lake-framework = "0.7.4" | |||
near-lake-framework = "=0.7.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing mocks for near-lake-framework
depend on behaviour which does not exist in the next version.
I'm pinning this for now, when we upgrade we'll need to find another way to mock it.
} | ||
MatchingRule::Event { .. } => { | ||
bail!("Event matching rule not yet supported for historical processing, function {:?} {:?}", indexer.account_id, indexer.function_name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we have a single stream for historical/real-time we can no longer bail here. Instead we just log and continue to the 'real-time' portion. Which is essentially the same behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry it took a while to review! Mainly just have some small comments on the specifics. Looks good to me overall!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Looks like the build failure is a rate limit issue, so that's resolvable... hopefully.
This PR adds the initial Coordinator V2 service, which acts as the main driver for the Control Plane.
Coordinator Overview
Coordinator V2 will exist as a new standalone service with it's primary goal being ensuring the current registry configuration is mapped to the system. It's core logic is just an infinite loop which reads the registry, and sends necessary requests to the Block Streamer and Runner services to synchronise that config.
Block Streamer Changes
Some changes have been made to Block Streamer to enable the above:
version
andredis_stream
have been added to the proto so that Coordinator can configure them.ActionFunctionCall
has been added - Initially I thought onlyActionAny
allowed, but the current registry hasActionFunctionCall
and therefore needs to be supported.last_published_block
is now written to Redis to enable "Start from interruption"What's not been done
I wanted to limit the scope of this PR as it was starting to get big, I'll address these tasks in follow up PRs: